<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('shop_cates', function (Blueprint $table) {
            $table->id();
            $table->string('name')->comment('商品分类名称');
            $table->string('slug')->nullable()->comment('商品分类的URL');
            $table->string('description')->nullable()->comment('商品分类描述');
            $table->unsignedInteger('order')->default(0)->comment('排序');
            $table->tinyInteger('hidden')->default(1)->comment('0:false/1:true');
            $table->string('status')->default('1')->comment('分类状态 1/正常 0/禁用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('shop_cates');
    }
};
